package cn.wolfcode.mq._04_message_filter;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        consumerGroup = "boot-consumer-demo4",
        topic = "04_filter",
        selectorType = SelectorType.SQL92,
        selectorExpression = " age = 20 "
)
public class MessageFilterConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("消息过滤线程:"+s);
    }
}
